	var datagrid;
	$(function() {
		datagrid = $("#myList").datagrid({
			url : "loginLog/list",
			loadMsg : "数据加载中请稍后……",
			iconCls : "icon-save",
			sortName : "id",
			sortOrder : "desc",
			fit : true,
			striped : true,
			autoRowHeight : false,
			fitColumns : false,
			pagination : true,
			pageSize : 20,
			pageList : [ 20, 30, 40, 50, 100 ],
			idField : "id",
			nowrap : true,
			singleSelect : true,// 单行选中
			rownumbers : true,// 显示行索引
			columns : [ [ {
				field : "chk",
				title : "",
				align : "left",
				width : 100,
				checkbox : true,
				hidden :true
			},{
				field : "id",
				title : "",
				align : "left",
				halign : "center",
				width : 150,
				hidden :true
			},{
				field : "name",
				title : "用户名称",
				align : "left",
				halign : "center",
				width : 150
			}, {
				field : "loginTime",
				title : "登录时间",
				align : "left",
				halign : "center",
				width : 150,
				formatter : function(value, rowData, rowIndex) {
					if (value == "") {
						return "";
					} else {
						return value.substring(0,19);
					}
				}
			}, {
				field : "loginAddress",
				title : "登录地址(ip)",
				align : "left",
				halign : "center",
				width : 150,
			}] ],
			toolbar : '#toolbar',
			onLoadSuccess : function(row,data){
				$('.iconImg').attr('src',sy.pixel_0);
				parent.$.messager.progress('close');
			}
		});
		
		
	});
		
		
	function searchFun(){
		datagrid.datagrid("load",serializetoObject($("#queryForm").form()));
	}
	function undoFun(){
		datagrid.datagrid('unselectAll');
	}
	function clearFun() {
		$('#queryForm input').val('');
		datagrid.datagrid('load', {});
	}
